home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / Lattice C disk 4.adf / Compiler_Headers / intuition / preferences.h < prev    next >
C/C++ Source or Header  |  1988-10-25  |  9KB  |  263 lines

  1. #ifndef INTUITION_PREFERENCES_H
  2. #define INTUITION_PREFERENCES_H
  3. /*
  4. **    $Filename: intuition/preferences.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    
  8. **
  9. **    (C) Copyright 1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include "exec/types.h"
  15. #endif
  16.  
  17. #ifndef DEVICES_TIMER_H
  18. #include "devices/timer.h"
  19. #endif
  20.  
  21. /* ======================================================================== */
  22. /* === Preferences ======================================================== */
  23. /* ======================================================================== */
  24.  
  25. /* these are the definitions for the printer configurations */
  26. #define FILENAME_SIZE    30        /* Filename size */
  27.  
  28. #define POINTERSIZE (1 + 16 + 1) * 2    /* Size of Pointer data buffer */
  29.  
  30. /* These defines are for the default font size.     These actually describe the
  31.  * height of the defaults fonts.  The default font type is the topaz
  32.  * font, which is a fixed width font that can be used in either 
  33.  * eighty-column or sixty-column mode.    The Preferences structure reflects
  34.  * which is currently selected by the value found in the variable FontSize,
  35.  * which may have either of the values defined below.  These values actually
  36.  * are used to select the height of the default font.  By changing the
  37.  * height, the resolution of the font changes as well.
  38.  */
  39. #define TOPAZ_EIGHTY 8    
  40. #define TOPAZ_SIXTY 9
  41.  
  42. struct Preferences
  43. {
  44.     /* the default font height */
  45.     BYTE FontHeight;        /* height for system default font  */
  46.  
  47.     /* constant describing what's hooked up to the port */
  48.     UBYTE PrinterPort;        /* printer port connection     */
  49.  
  50.     /* the baud rate of the port */
  51.     USHORT BaudRate;        /* baud rate for the serial port   */
  52.     
  53.     /* various timing rates */
  54.     struct timeval KeyRptSpeed;        /* repeat speed for keyboard       */
  55.     struct timeval KeyRptDelay;        /* Delay before keys repeat           */
  56.     struct timeval DoubleClick;        /* Interval allowed between clicks */
  57.  
  58.     /* Intuition Pointer data */
  59.     USHORT PointerMatrix[POINTERSIZE];    /* Definition of pointer sprite       */
  60.     BYTE XOffset;        /* X-Offset for active 'bit'       */
  61.     BYTE YOffset;        /* Y-Offset for active 'bit'       */
  62.     USHORT color17;        /***********************************/
  63.     USHORT color18;        /* Colours for sprite pointer      */
  64.     USHORT color19;        /***********************************/
  65.     USHORT PointerTicks;    /* Sensitivity of the pointer       */
  66.  
  67.     /* Workbench Screen colors */
  68.     USHORT color0;        /***********************************/
  69.     USHORT color1;        /*    Standard default colours       */
  70.     USHORT color2;        /*     Used in the Workbench           */
  71.     USHORT color3;        /***********************************/
  72.  
  73.     /* positioning data for the Intuition View */
  74.     BYTE ViewXOffset;        /* Offset for top lefthand corner  */
  75.     BYTE ViewYOffset;        /* X and Y dimensions           */
  76.     WORD ViewInitX, ViewInitY;        /* View initial offset values      */
  77.  
  78.     BOOL EnableCLI;        /* CLI availability switch */
  79.  
  80.     /* printer configurations */
  81.     USHORT PrinterType;        /* printer type               */
  82.     UBYTE PrinterFilename[FILENAME_SIZE];/* file for printer       */
  83.  
  84.     /* print format and quality configurations */
  85.     USHORT PrintPitch;        /* print pitch           */
  86.     USHORT PrintQuality;    /* print quality       */
  87.     USHORT PrintSpacing;    /* number of lines per inch    */
  88.     UWORD PrintLeftMargin;    /* left margin in characters       */
  89.     UWORD PrintRightMargin;    /* right margin in characters       */
  90.     USHORT PrintImage;        /* positive or negative           */
  91.     USHORT PrintAspect;        /* horizontal or vertical      */
  92.     USHORT PrintShade;        /* b&w, half-tone, or color    */
  93.     WORD PrintThreshold;    /* darkness ctrl for b/w dumps       */
  94.  
  95.     /* print paper descriptors */
  96.     USHORT PaperSize;        /* paper size           */
  97.     UWORD PaperLength;        /* paper length in number of lines */
  98.     USHORT PaperType;        /* continuous or single sheet       */
  99.  
  100.     /* Serial device settings: These are six nibble-fields in three bytes */
  101.     /* (these look a little strange so the defaults will map out to zero) */ 
  102.     UBYTE   SerRWBits;         /* upper nibble = (8-number of read bits)      */
  103.                  /* lower nibble = (8-number of write bits)      */
  104.     UBYTE   SerStopBuf;         /* upper nibble = (number of stop bits - 1)  */
  105.                  /* lower nibble = (table value for BufSize)  */
  106.     UBYTE   SerParShk;         /* upper nibble = (value for Parity setting) */
  107.                  /* lower nibble = (value for Handshake mode) */
  108.     UBYTE   LaceWB;         /* if workbench is to be interlaced      */
  109.  
  110.     UBYTE   WorkName[FILENAME_SIZE];  /* temp file for printer        */
  111.  
  112.     BYTE    RowSizeChange; 
  113.     BYTE    ColumnSizeChange;  
  114.  
  115.     UWORD   PrintFlags;        /* user preference flags */
  116.     UWORD   PrintMaxWidth;  /* max width of printed picture in 10ths/inch */
  117.     UWORD   PrintMaxHeight; /* max height of printed picture in 10ths/inch */
  118.     UBYTE   PrintDensity;   /* print density */
  119.     UBYTE   PrintXOffset;   /* offset of printed picture in 10ths/inch */
  120.  
  121.     UWORD   wb_Width;        /* override default workbench width     */
  122.     UWORD   wb_Height;        /* override default workbench height */
  123.     UBYTE   wb_Depth;        /* override default workbench depth     */
  124.  
  125.     UBYTE   ext_size;        /* extension information -- do not touch! */
  126.                 /* extension size in blocks of 64 bytes */
  127. };
  128.  
  129.  
  130. /* Workbench Interlace (use one bit) */
  131. #define LACEWB        0x01
  132. #define LW_RESERVED    1     /* internal use only */
  133.  
  134. /* PrinterPort */
  135. #define PARALLEL_PRINTER 0x00
  136. #define SERIAL_PRINTER    0x01
  137.  
  138. /* BaudRate */
  139. #define BAUD_110    0x00
  140. #define BAUD_300    0x01
  141. #define BAUD_1200   0x02
  142. #define BAUD_2400   0x03
  143. #define BAUD_4800   0x04
  144. #define BAUD_9600   0x05
  145. #define BAUD_19200  0x06
  146. #define BAUD_MIDI   0x07
  147.  
  148. /* PaperType */
  149. #define FANFOLD        0x00
  150. #define SINGLE        0x80
  151.  
  152. /* PrintPitch */
  153. #define PICA        0x000
  154. #define ELITE        0x400
  155. #define FINE        0x800
  156.  
  157. /* PrintQuality */
  158. #define DRAFT        0x000
  159. #define LETTER        0x100
  160.  
  161. /* PrintSpacing */
  162. #define SIX_LPI        0x000
  163. #define EIGHT_LPI   0x200
  164.  
  165. /* Print Image */
  166. #define IMAGE_POSITIVE    0x00
  167. #define IMAGE_NEGATIVE    0x01
  168.  
  169. /* PrintAspect */
  170. #define ASPECT_HORIZ    0x00
  171. #define ASPECT_VERT 0x01
  172.  
  173. /* PrintShade */
  174. #define SHADE_BW    0x00
  175. #define SHADE_GREYSCALE 0x01
  176. #define SHADE_COLOR 0x02
  177.  
  178. /* PaperSize */
  179. #define US_LETTER   0x00
  180. #define US_LEGAL    0x10
  181. #define N_TRACTOR   0x20
  182. #define W_TRACTOR   0x30
  183. #define CUSTOM        0x40
  184.  
  185. /* PrinterType */
  186. #define CUSTOM_NAME    0x00
  187. #define ALPHA_P_101    0x01
  188. #define BROTHER_15XL        0x02
  189. #define CBM_MPS1000    0x03
  190. #define DIAB_630    0x04
  191. #define DIAB_ADV_D25        0x05
  192. #define DIAB_C_150    0x06
  193. #define EPSON        0x07
  194. #define EPSON_JX_80    0x08
  195. #define OKIMATE_20    0x09
  196. #define QUME_LP_20    0x0A
  197. /* new printer entries, 3 October 1985 */
  198. #define HP_LASERJET    0x0B
  199. #define HP_LASERJET_PLUS    0x0C
  200.  
  201. /* Serial Input Buffer Sizes */
  202. #define SBUF_512    0x00
  203. #define SBUF_1024    0x01
  204. #define SBUF_2048    0x02
  205. #define SBUF_4096    0x03
  206. #define SBUF_8000    0x04
  207. #define SBUF_16000    0x05
  208.  
  209. /* Serial Bit Masks */
  210. #define SREAD_BITS  0xF0 /* for SerRWBits   */
  211. #define SWRITE_BITS 0x0F
  212.  
  213. #define SSTOP_BITS  0xF0 /* for SerStopBuf  */
  214. #define SBUFSIZE_BITS    0x0F
  215.  
  216. #define SPARITY_BITS    0xF0 /* for SerParShk
  217. #define SHSHAKE_BITS    0x0F
  218.  
  219. /* Serial Parity (upper nibble, after being shifted by
  220.  * macro SPARNUM() )
  221.  */
  222. #define SPARITY_NONE     0
  223. #define SPARITY_EVEN     1
  224. #define SPARITY_ODD     2
  225.  
  226. /* Serial Handshake Mode (lower nibble, after masking using 
  227.  * macro SHANKNUM() )
  228.  */
  229. #define SHSHAKE_XON     0
  230. #define SHSHAKE_RTS     1
  231. #define SHSHAKE_NONE     2
  232.  
  233. /* new defines for PrintFlags */
  234.  
  235. #define CORRECT_RED        0x0001  /* color correct red shades */
  236. #define CORRECT_GREEN        0x0002  /* color correct green shades */
  237. #define CORRECT_BLUE        0x0004  /* color correct blue shades */
  238.  
  239. #define CENTER_IMAGE        0x0008  /* center image on paper */
  240.  
  241. #define IGNORE_DIMENSIONS   0x0000 /* ignore max width/height settings */
  242. #define BOUNDED_DIMENSIONS  0x0010  /* use max width/height as boundaries */
  243. #define ABSOLUTE_DIMENSIONS 0x0020  /* use max width/height as absolutes */
  244. #define PIXEL_DIMENSIONS    0x0040  /* use max width/height as prt pixels */
  245. #define MULTIPLY_DIMENSIONS 0x0080 /* use max width/height as multipliers */
  246.  
  247. #define INTEGER_SCALING        0x0100  /* force integer scaling */
  248.  
  249. #define ORDERED_DITHERING   0x0000 /* ordered dithering */
  250. #define HALFTONE_DITHERING  0x0200  /* halftone dithering */
  251. #define FLOYD_DITHERING        0x0400 /* Floyd-Steinberg dithering */
  252.  
  253. #define ANTI_ALIAS        0x0800 /* anti-alias image */
  254. #define GREY_SCALE2        0x1000 /* for use with hi-res monitor */
  255.  
  256. /* masks used for checking bits */
  257.  
  258. #define CORRECT_RGB_MASK    (CORRECT_RED|CORRECT_GREEN|CORRECT_BLUE)
  259. #define DIMENSIONS_MASK        (BOUNDED_DIMENSIONS|ABSOLUTE_DIMENSIONS|PIXEL_DIMENSIONS|MULTIPLY_DIMENSIONS)
  260. #define DITHERING_MASK        (HALFTONE_DITHERING|FLOYD_DITHERING)
  261.  
  262. #endif    /* INTUITION_PREFERENCES_H */
  263.